package com.stud.system.domain;

import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.stud.common.annotation.Excel;
import com.stud.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 流程定义对象 t_workflow_definition
 *
 * @author Stud
 * @date 2023-03-06
 */
@Schema(description = "流程定义")
@Data
@TableName("t_workflow_definition")
public class WorkflowDefinition extends BaseEntity {

    @Excel(name = "流程编码")
    @Schema(description = "流程编码")
    @NotBlank(message = "流程编码不能为空")
    private String definitionCode;

    @TableField(condition = SqlCondition.LIKE)
    @Excel(name = "流程名称")
    @NotBlank(message = "流程名称不能为空")
    @Schema(description = "流程名称")
    private String definitionName;

    @Excel(name = "流程类型")
    @NotBlank(message = "流程类型不能为空")
    @Schema(description = "流程类型(0:串行;1:并行)")
    private String definitionType;

    @TableField(condition = SqlCondition.LIKE)
    @Excel(name = "表单名称")
    @Schema(description = "表单名称")
    private String formName;

    @Excel(name = "版本号")
    @Schema(description = "版本号")
    private Integer version;

    @Excel(name = "业务表名")
    @Schema(description = "业务表名")
    @NotBlank(message = "业务表名不能为空")
    private String businessTable;

    @Schema(description = "是否最高版本(0:是;1:否)")
    private String flag;

}
